Class ModuleDescriptorImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ModuleDescriptorImpl
All Implemented Interfaces:
IPCObject, ModuleDescriptor

public class ModuleDescriptorImpl extends IPCObjectImpl implements ModuleDescriptor
Information provided by the PKI file:

    \class ModuleDescriptor
    
    \brief Descriptor for modules.  Used to create a module based on the stored information.
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getType

      public ModuleType getType()
      Information provided by the PKI file:
      
          \brief Returns the type of the module descriptor.
          
          \return ModuleType, the number of the module.
          Types: eLineCard = 0,
          eNetworkModule = 1,
          eInterfaceCard = 2,
          ePtRouterModule = 3,
          ePtSwitchModule = 4,
          ePtCloudModule = 5,
          ePtRepeaterModule = 6,
          ePtHostModule = 7,
          ePtModemModule = 8,
          ePtLaptopModule = 9,
          ePtTVModule = 10,
          eIpPhonePowerAdapter = 11,
          ePtTabletPCModule = 12,
          ePtPdaModule = 13,
          ePtWirelessEndDeviceModule = 14,
          ePtWiredEndDeviceModule = 15,
          eTrs35 = 16,
          eUsb = 17,
          eNonRemovableModule = 18,
          eASAModule = 19,
          eASAPowerAdapter = 20,
          ePtCellTowerModule = 21,
          ePtIoeModule = 22,
          ePtIoeNetworkModule = 23,
          ePtIoeAnalogModule = 24,
          ePtIoeDigitalModule = 25,
          ePtIoeCustomIOModule = 26,
          ePtIoePowerAdapter = 27,
          ePtIoeMcuComponentPowerAdapter = 28,
          ePtRouterPowerAdapter = 29,
          eSfpModule = 30,
          eAccessPointPowerAdaptor = 31,
          eNonRemovableInterfaceCard = 32,
          eCustomModuleType = 2000
          
              
      Specified by:
      getType in interface ModuleDescriptor
      Returns:
      ModuleType Returns a ModuleType
    • getModel

      public String getModel()
      Information provided by the PKI file:
      
          \brief Returns type name of the module..
          
          \return string, type name of the model.  Something like "NM-2W".
          
              
      Specified by:
      getModel in interface ModuleDescriptor
      Returns:
      String Returns a String
    • setImagePath

      public void setImagePath(String path)
      Information provided by the PKI file:
      
          \brief Sets the image path to the image to use for the module.
          
          \param path, path of the image to use.  Something like "../art/PhysicalView/gModuleNM-4AS.xpm"
          
              
      Specified by:
      setImagePath in interface ModuleDescriptor
      Parameters:
      path - Takes in a parameter of path
    • getImagePath

      public String getImagePath()
      Information provided by the PKI file:
      
          \brief Gets the image path to the image to use for the module.
          
          \return string, path of the image to use.  Something like "../art/PhysicalView/gModuleNM-4AS.xpm"
          
              
      Specified by:
      getImagePath in interface ModuleDescriptor
      Returns:
      String Returns a String
    • setInfo

      public void setInfo(String strInfo)
      Information provided by the PKI file:
      
          \brief Sets the text to display when in module view and the module is selected.
          
          \param strInfo, text to display explaining the module.
          
              
      Specified by:
      setInfo in interface ModuleDescriptor
      Parameters:
      strInfo - Takes in a parameter of strInfo
    • getInfo

      public String getInfo()
      Information provided by the PKI file:
      
          \brief Gets the text to display when in module view and the module is selected.
          
          \return QString, text that is displayed explaining the module.
          
              
      Specified by:
      getInfo in interface ModuleDescriptor
      Returns:
      String Returns a String
    • setGroup

      public void setGroup(String group)
      Information provided by the PKI file:
      
          \brief Sets the group the module is considered a part of.
          
          \param group, Some modules use this and most don't.  The ones that do can be "SENSORS" or "ACTUATORS".
          
              
      Specified by:
      setGroup in interface ModuleDescriptor
      Parameters:
      group - Takes in a parameter of group
    • getGroup

      public String getGroup()
      Information provided by the PKI file:
      
          \brief Gets the group the module is considered a part of.
          
          \return QString, Some modules use this and most don't.  The ones that do can be "SENSORS" or "ACTUATORS".
          
              
      Specified by:
      getGroup in interface ModuleDescriptor
      Returns:
      String Returns a String
    • addSlot

      public void addSlot(ModuleType type)
      Information provided by the PKI file:
      
          \brief Adds the given module type to the module descriptor.  Doing this allows the module type to be added to the module created from the descriptor.
          
          \param type, module type to add.
          
              
      Specified by:
      addSlot in interface ModuleDescriptor
      Parameters:
      type - Takes in a parameter of type
    • getSlotCount

      public int getSlotCount()
      Information provided by the PKI file:
      
          \brief Returns the number of slots in the descriptor.
          
          \return int, the number of slots in the descriptor.
          
              
      Specified by:
      getSlotCount in interface ModuleDescriptor
      Returns:
      int Returns a int
    • getSlotTypeAt

      public ModuleType getSlotTypeAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the module type of the given slot index.
          
          \param index, slot index to get the module type for.
          
          \return ModuleType, the module type of the given slot index.
          
              
      Specified by:
      getSlotTypeAt in interface ModuleDescriptor
      Parameters:
      index - Takes in a parameter of index
      Returns:
      ModuleType Returns a ModuleType
    • removeModuleAt

      public void removeModuleAt(int index)
      Information provided by the PKI file:
      
          \brief Removes the module descriptor to the given module index.
          
          \param index, index to try to remove the module descriptor from.  Range (0, getModuleCount()-1).
          
              
      Specified by:
      removeModuleAt in interface ModuleDescriptor
      Parameters:
      index - Takes in a parameter of index
    • getModuleCount

      public int getModuleCount()
      Information provided by the PKI file:
      
          \brief Returns the number of module descriptions stored.
          
          \return int, the number of module descriptions stored.
          
              
      Specified by:
      getModuleCount in interface ModuleDescriptor
      Returns:
      int Returns a int
    • getModuleAt

      public ModuleDescriptor getModuleAt(int index)
      Information provided by the PKI file:
      
          \brief Returns module description at the given index.
          
          \param index, index to retrive the description from.  Range (0, getModuleCount()-1).
          
          \return ModuleDescriptor, the module description at the given index.
          
              
      Specified by:
      getModuleAt in interface ModuleDescriptor
      Parameters:
      index - Takes in a parameter of index
      Returns:
      ModuleDescriptor Returns a ModuleDescriptor
    • setHotSwappable

      public void setHotSwappable(boolean bHot)
      Information provided by the PKI file:
      
          \brief Set if the module is hot swappable (able to be removed and added while the device is powered on).
          
          \param bHot, true if the module can be added and removed while the device is powered on, false if not.
          
              
      Specified by:
      setHotSwappable in interface ModuleDescriptor
      Parameters:
      bHot - Takes in a parameter of bHot
    • isHotSwappable

      public boolean isHotSwappable()
      Information provided by the PKI file:
      
          \brief Get if the module is hot swappable (able to be removed and added while the device is powered on).
          
          \return bool, true if the module can be added and removed while the device is powered on, false if not.
          
              
      Specified by:
      isHotSwappable in interface ModuleDescriptor
      Returns:
      boolean Returns a boolean
    • addModulePhysicalView

      public ModulePhysicalView addModulePhysicalView(int X1, int X2, int Y1, int Y2)
      Information provided by the PKI file:
      
          \brief Add a display area to the descriptor.
          
          \param X1, left x.
          \param X2, right x.
          \param Y1, top y.
          \param Y2, bottom y.
          
              
      Specified by:
      addModulePhysicalView in interface ModuleDescriptor
      Parameters:
      X1 - Takes in a parameter of X1
      X2 - Takes in a parameter of X2
      Y1 - Takes in a parameter of Y1
      Y2 - Takes in a parameter of Y2
      Returns:
      ModulePhysicalView Returns a ModulePhysicalView
    • getModulePhysicalViewCount

      public int getModulePhysicalViewCount()
      Information provided by the PKI file:
      
          \brief Get the number of display areas in the module.
          
          \return int, the number of display areas in the module descriptor.
          
              
      Specified by:
      getModulePhysicalViewCount in interface ModuleDescriptor
      Returns:
      int Returns a int
    • getModulePhysicalViewAt

      public ModulePhysicalView getModulePhysicalViewAt(int index)
      Information provided by the PKI file:
      
          \brief Get the display area at the given index.
          
          \param index, index of the display area to retrive.
          
          return ModulePhysicalView, display area at the given index.
          
              
      Specified by:
      getModulePhysicalViewAt in interface ModuleDescriptor
      Parameters:
      index - Takes in a parameter of index
      Returns:
      ModulePhysicalView Returns a ModulePhysicalView
    • create

      public Module create()
      Information provided by the PKI file:
      
          \brief Create a module using the descriptor.
          
          \return Module, module created using the descriptor.
          
              
      Specified by:
      create in interface ModuleDescriptor
      Returns:
      Module Returns a Module